import java.lang.Math;
public class Main {
	public static void main(String[] d){
		double a=1,b=-2,c=1;
	    if((b*b-4*a*c)<0)
	    	System.out.println("方程无根！");
	    else 
	    {
		    if((b*b-4*a*c)==0)
		    	System.out.println("方程有两个相同的根为："+(double)((-b)/2*a));
		    else
		    	System.out.println("X1="+(double)(-b+Math.sqrt(b*b-4*a*c))/(2*a)+"  "+"X2="+(double)(-b-Math.sqrt(b*b-4*a*c))/(2*a));
		}
	}
}